#include "DictProducer.h"
#include "SplitTool.h"
#include "SplitToolCppJieba.h"
#include "Configuration.h"
#include <chrono>
#include <thread>

int main()
{
    //SplitToolCppJieba ChSplitTool;
    //DictProducer producer(&splitTool);
    //SplitTool EnSplitTool;
    //vector<string> words;
    //words = EnSplitTool.cut("yuliao_src/english.txt");
    //words = ChSplitTool.cut("Ch_yuliao/C3-Art0019.txt");

    //创建词典和索引并保存的测试
    DictProducer puoducer;
    puoducer.buildEnDict();
    puoducer.buildCnDict();
    puoducer.createIndex();
    puoducer.store();


    // //读取配置文件
    // Configuration & conf = Configuration::GetConfiguration();
    // conf.ReadConfiguration();


    // //循环打印
    // for(auto word: puoducer._EnDict)
    // for(auto word: puoducer._index)
    // {
    //     //std::this_thread::sleep_for(std::chrono::milliseconds(100));        
    //     // cout << "word = " << word << "\n";
    //     //cout << word.first << " : " << word.second << "\n";
    //     //cout << word.first << " : " << word.second << "\n";
    //     cout << "---------------------------------------------------------------------------------\n";
    //     cout << word.first << " : ";
    //     for(auto ele : word.second)
    //     {
    //         cout << " " << ele << " ";
    //     }

    //     cout << "\n#################################################################################\n\n\n\n\n\n\n\n\n";
    // }
}
